Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
customer-js-sdk
Advanced tools
The customer-js-sdk is a Front-End layer of abstraction for communicating with Back-End services.
npm install --save customer-js-sdk
import { v0 as sdk } from 'customer-js-sdk';
baseUrl
sdk.baseUrl.set('http://custom.api/');
sdk.headers.append('Content-Type', 'application/json');
sdk.headers.get();
sdk.headers.remove('Content-Type');
GET
request without parameterssdk.merchants.partners.get();
GET
request with URL parametersdk.merchants.addresses.get({
urlParam: '123456789'
});
POST
request with bodysdk.merchants.contacts.post({}, {
body: '123456789'
});
POST
request with URL parameter and bodysdk.merchants.contacts.post({
urlParam: '123456789'
}, {
body: '123456789'
});
baseUrl
to overide the default in a specific requestsdk.merchants.partners.get('https://custom.api/');
sdk.merchants.addresses.get('https://custom.api/', {
urlParam: '123456789'
});
sdk.merchants.contacts.post('https://custom.api/', {
urlParam: '123456789'
}, {
body: '123456789'
});
Middlewares run before and after every request in the same order that they were declared. Every middleware must call either proceed
or quit
in order to work.
sdk.middleware.use({
beforeRequest({ proceed, quit }) {
if (conditionMet) {
proceed();
} else {
quit();
}
},
afterRequest({ proceed }) {
logSomething();
proceed();
}
});
sdk.middleware.use({
async beforeRequest({ proceed }) {
await doSomethingAsync();
proceed();
}
});
FAQs
Customer JS SDK main repo.
The npm package customer-js-sdk receives a total of 348 weekly downloads. As such, customer-js-sdk popularity was classified as not popular.
We found that customer-js-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.